﻿using NHibernate;

namespace Tanmia.Basis.Data.NHibernate
{
    public interface ISessionGate
    {
        /// <summary>
        /// Gets new instance of the Session if no Session was instanciated. Otherwise open Session and return it.
        /// </summary>
        ISession Session { get; }

        /// <summary>
        /// Gets new instance of the StatelessSession if no StatelessSession was instanciated. Otherwise open StatelessSession and return it.
        /// </summary>
        IStatelessSession StatelessSesion { get; }
    }
}
